{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy import *\n",
    "from sympy.abc import *\n",
    "from sympy import sin, cos, pi\n",
    "from matplotlib import pyplot as plt\n",
    "import numpy as np\n",
    "from IPython.display import display, Math\n",
    "from handcalcs import *\n",
    "from sympy.physics.hydrogen import*\n",
    "f,g,T,V,T= symbols('f g x v t', cls=Function)\n",
    "w_0,w_1,w_2,v_0,v_1,J_0,J_1,J_A,J_B,m_1,m_2,J_2,w,phi,w_1,phi_1,w_2,phi_2= symbols('w_0 w_1 w_2 v_0 v_1,J_0,J_1,J_A,J_B,m_1,m_2,J_2,omega,varphi,omega_1,varphi_1,omega_2,varphi_2')\n",
    "x,v_10,v_2,v_20,e=symbols(\"x v_1' v_2 v_2' e\")\n",
    "beta=symbols('beta')\n",
    "def out(x,x_1=0,x_2=0,x_3=0,x_4=0,x_5=0,x_6=0,x_7=0,x_8=0,x_9=0,x_10=0,x_11=0):\n",
    "   if x==0:\n",
    "      return\n",
    "   if x_1==0:\n",
    "       display(Math(latex(x)))\n",
    "   else:\n",
    "       if type(x_1)==str:\n",
    "          display(Math(x_1+latex(x)))\n",
    "       else:\n",
    "           display(Math(latex(x)))\n",
    "   out(x_2,x_3)\n",
    "   out(x_4,x_5)\n",
    "   out(x_6,x_7)\n",
    "   out(x_8,x_9)\n",
    "   out(x_10,x_11)\n",
    "def tex(x):\n",
    "   print(latex(x))\n",
    "def r1(x,y):\n",
    "   return Rational(x,y) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\log{\\left(x^{2} + 1 \\right)} - 2 \\operatorname{atan}{\\left(x \\right)}$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "out(integrate((-2-2*x)/(1+x**2),(x)))"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "a6b2a446df440bee9c99ca0d62e47ab197710c7f47ecf8f74e850abc8bd383c6"
  },
  "kernelspec": {
   "display_name": "Python 3.9.7 ('base')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
